package com.zp.base.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zp.base.admin.vo.UserVo;
import com.zp.base.admin.entity.MenuEntity;
import com.zp.base.admin.entity.UserEntity;
import com.zp.base.admin.common.utils.PageUtils;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author zhangpeng
 * @email zhangpeng@aliyun.com
 * @date 2021-02-28 11:15:56
 */
public interface UserService extends IService<UserEntity>, UserDetailsService {

    PageUtils queryPage(Map<String, Object> params);

    UserEntity findByUsername(String username);

    boolean addUser(UserVo addUserVo);

    boolean usernameIsExists(String username, long id);

    boolean updateUser(UserVo updateUserVo);

    UserVo selectByUserId(Long id);

    boolean deleteByUserId(Long id);

    List<MenuEntity> getMenusByUserId(Long id);

    List<String> findRolesByUserId(Long id);

}


